<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta charset="utf-8">
		<meta name="Reki" content="2015?11?6? ??11:42:35">
		<meta name="keywords" content="">
		<meta name="description" content="">
		<link href="../images/icon.jpg" rel="icon">
		<link href="../css/bootstrap.css" rel="stylesheet">
		<title>Reki彩票投注站</title>
		<script type="text/javascript" src="../javascript/jquery-1.11.1.min.js"></script>
		<script type="text/javascript" src="../javascript/bootstrap.min.js"></script>
	</head>
	<body>
	
		<nav class="navbar navbar-inverse navbar-fixed-top">
			<div class="container">
		      <div class="navbar-header">
		         <a class="navbar-brand" href="#">彩票投注站</a>
		      </div>
		      <div id="navbar" class="navbar-collapse collapse">
		        <ul class="nav navbar-nav">
	        		<c:forEach items="${bmap }" var="map">
						<li class="dropdown">
	                 		<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">${map.key.boardName }<span class="caret"></span></a>
		               		<c:forEach items="${map.value }" var ="b">
		               			<ul class="dropdown-menu">
		                   			 <li><a href="#">${b.boardName }</a></li>
		                 		 </ul>
		               		</c:forEach>
	               		</li>
	        		</c:forEach>
		        </ul>
		          <div class="navbar-form navbar-right">
		            <div class="form-group">
						<c:choose>
							<c:when test="${empty user }">
								<button type="button" class="btn btn-success" data-toggle="modal" data-target="#userLoginModal">登录</button>
							</c:when>
							<c:otherwise>
								<button type="button" class="btn btn-success">${user.nickname }</button>	
							</c:otherwise>
						</c:choose>
		            </div>
		            	<c:choose>
		            		<c:when test="${empty user}">
		            			<a class="btn btn-success" href="user-register.jsp">注册</a>			
		            		</c:when>
		            		<c:otherwise>
		            			<a class="btn btn-success" href="#">注销</a>
		            		</c:otherwise>
		            	</c:choose>
		          </div>
		      </div>
		   </div>		
		</nav>
	</body>
</html>